#pragma once

#ifndef M_PI
#define M_PI (3.141592654)
#endif

#ifndef ONE_G
#define ONE_G (9.80665)
#endif

typedef struct
{
	double x, y, z;
} Vector3f;

typedef struct
{
	double w, x, y, z;
} Vector4f;

typedef struct
{
	double angle;
	double axis_x;
	double axis_y;
	double axis_z;
} AxisAngle;

// 返回两个double型变量的最大值
double em_max(double a, double b);

// 返回两个double型变量的最小值
double em_min(double a, double b);

// 角度转弧度
double em_radians(double angle);

// 弧度转角度
double em_angle(double radians);

// 限幅
void em_limit_value(double* value, double min, double max);
